<script>
    var obj={name:'Tom',age:16};
    for(var k in obj){
        console.log(k+'-'+obj[k]);
    }
 var obj={name:"Tom",age:16};
    console.log('name' in obj);//输出结果：true
    console.log('gender' in obj);//输出结果：false
</script>